public class Foot extends Length {

    public Foot(double val, String unit) {
        super(val, unit);
    }


    public Length converter(String unit) {
        if (YARD.equals(unit)) {
            return new Yard(this.value / 3, unit);
        } else if (INCH.equals(unit)) {
            return new Inch(this.value * 12, unit);
        }
        return this;
    }
}
